import serve from './../Base/Http.js'
import qs from 'qs'
   // 数据列表
   export default {
    orderData(allPages){
        return serve({
            method:'get',
            params:{
                _gp:"admin.order",
                _mt:"list",   
                // 
                orderNo:allPages.orderNo,
                status:allPages.status,
                //  分页
                page: allPages.currentPage,
                limit: allPages.eachpage
              }
        })
    },
    details(data){
        return serve({
            method:'get',
            params:{
                _gp:"admin.order",
                _mt:"detail",    
                orderId:data 
              }
        })
    },
 // 发货
 deliver(data){
    return serve({
        method: "post",
        data: qs.stringify({
            _gp: "admin.order",
            _mt: "ship",
          ...data
        })
    })
},
//退款
 refund(data) {
    return serve({
        method: "get",
        params: {
            _gp: "admin.order",
            _mt: "refund",
            ...data
        }
    });
},
derive(ruleForm) {
    return serve({
      method: "post",
      data: qs.stringify({
        _gp: 'admin.order',
        _mt: 'queryToExcel',
        status:ruleForm.status
      })
    });
  },
  distri(data) {
    return serve({
      method: "post",
      data: qs.stringify({
        _gp: 'admin.order',
        _mt:'detail',
        ...data
      })
    });
  },
// 颜色
colour(radio, input,id) {
    return serve({
      method: "post",
      data: qs.stringify({
        _gp: "admin.order",
        _mt: "editAdminMono",
        orderId: id,
        level:radio,
        mono:input 
      })
    });
  },
}